package com.sixtwo.member.service.impl;

import com.sixtwo.member.dao.MemberMapper;
import com.sixtwo.member.dto.MemberDto;
import com.sixtwo.member.entity.Member;
import com.sixtwo.member.service.MemberService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MemberServiceImpl implements MemberService {

    @Autowired
    private MemberMapper mapper;

    @Override
    public Long insert(MemberDto memberDto) {
        Member member = new Member();
        BeanUtils.copyProperties(memberDto, member);
        return mapper.insert(member);
    }
}
